
public class P16 {
	public static void main(String[] args) {
		String result = Util.power("2", "1000");
		byte[] b = result.getBytes();
		int sum = 0;
		for (int i = 0; i < b.length; i++) {
			sum += (b[i] - 48);
		}
		System.out.println(sum);
	}
}